	<style>
body{ background:#fff url(image/body_bg1.gif) repeat-x;}
</style>
	<div class="wal">
        <div class="title2">
            <h3 class="title2-h3">用户注册</h3> 
        </div>
         <form id="regist">
            <div class="login">
                 <div class="form_div1">
                      <span class="span1">用户名：</span>
                      <span><input name="username" type="text" class="input1" /></span>
                      <span class="span2"><b>*</b>请输入6-20个英文字母、数字组成的字符 </span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">密　码：</span>
                      <span><input name="password" type="password" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">确认密码：</span>
                      <span><input name="password_confirm" type="password" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">手　机：</span>
                      <span><input name="mobile" type="text" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">电子邮箱：</span>
                      <span><input name="email" type="text" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">发票名称：</span>
                      <span><input name="fp_name" type="text" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">发票抬头：</span>
                      <span><input name="fp_tt" type="text" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">发票内容：</span>
                      <span><input name="fp_nr" type="text" class="input1" /></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">收件人姓名：</span>
                      <span><input name="receive_name" type="text" value="<?=$this->cr['receive_name']?>" class="input1" /></span>
                      <span class="span2"><b>*</b></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">收货地址：</span>
                      <span>
						<b id="region">
							<select>
								<option value="0" selected>请选择</option>
								<?php foreach((array)$this->address as $address): ?>
								<option value="<?=$address['class_id']?>"><?=$address['class_name']?></option>
								<?php endforeach; ?>
							</select>
						</b><br /><input id='address' name="address" value="<?=$this->cr['address']?>"  type="text" class="input1" /><b>*</b></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">邮编：</span>
                      <span><input name="zip" type="text" value="<?=$this->cr['zip']?>"  class="input1" /><b>*</b></span>
                 </div>
				 <div class="form_div1">
                      <span class="span1">联系电话：</span>
                      <span><input name="tel" type="text" value="<?=$this->cr['tel']?>"  class="input1" /><b>*</b></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1">验证码：</span>
                      <span><input name="captcha" id="verify" type="text" class="input1 input2" /></span>
                      <span><a href="#"><img rel="verify" src="" title="点击更换验证码" /></a></span>
                 </div>
                 <div class="form_div1">
                      <span class="span1"></span>
                      <span><input name="" type="submit" value="" class="btn2" /></span>
                 </div>
            </div>
			</form>
     </div>
</div>

<script>
$(function(){	
	cselectorInit('region');
	$('img[rel=verify]').click(function(){
		$(this).attr('src','captcha.php?r='+Math.random());
	});
	$('img[rel=verify]').click();
	$('#regist').submit(function(){
		$.post('user.php?act=regist',$(this).serialize(),function(data){
			alert(data.message);
			if (data.state == 1)
			{
				window.location.href = 'my.php';
			}
			else
			{				
				$('img[rel=verify]').click();
				$('#verify').focus().val('');
			}
		},'json');
		return false;
	});
});
</script>